﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LianKe.SerivesPlugin
{
    [Description("联科自动生成执行计划操作插件"), HotUpdate]
    public class AutoCreateSchedule : AbstractOperationServicePlugIn
    {
        public override void EndOperationTransaction(EndOperationTransactionArgs e)
        {
            base.EndOperationTransaction(e);
            string operationNumber = this.FormOperation.Operation;
            if (operationNumber.EqualsIgnoreCase("Audit"))
            {
                CreateSchedule(e.DataEntitys.FirstOrDefault());
            }
            if (operationNumber.EqualsIgnoreCase("UnAudit"))
            {
                DeleteSchedule(e.DataEntitys.FirstOrDefault());
            }
        }

        private void DeleteSchedule(DynamicObject dataObj)
        {
            
        }

        private void CreateSchedule(DynamicObject dataObj)
        {
            
        }
    }
}
